<template>
  <div  v-if="datas.data">
    <div class="box">
      <div class="box-top">
        <div class="left">
          <p style="color: #999; font-size: 16px">今年</p>
          <p style="color: gold; font-size: 22px">￥{{ datas.data.year }}</p>
        </div>
        <div class="right">
          <p style="color: #999; font-size: 16px">总收入</p>
          <p style="color: gold; font-size: 22px">￥{{ datas.data.total }}</p>
        </div>
      </div>
      <div class="boxBg">
        同比 <span style="color: #13227a">{{ datas.data.contrast }}</span>
      </div>
      <div class="yuan-box">
        <div class="l yuan"></div>
        <div class="r yuan"></div>
      </div>

      <div class="line">
        <img
          src="../../assets/images/收入统计.png"
          width="25"
          height="25"
          alt=""
        />
        <span>收入分析</span>
      </div>
      <div class="line-list">
        <div v-for="(item,index) in datas.data.list" :key="index">
          <div class="lefts" style="color: #999">{{item.year}}</div>
          <div class="rights" style="color: gold">{{item.income}}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["datas"],
  data() {
    return {};
  },
};
</script>
 
<style lang = "less" scoped>
.line-list {
  padding: 5px 20px;
  div {
      height: 24px;
    border-bottom: 1px dashed #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}
.line {
    border-bottom: 1px dashed #999;
  padding: 20px;
  height: 25px;
  line-height: 25px;
  display: flex;

  span {
    margin-left: 15px;
    color: #999;
    font-size: 22px;
    font-weight: bold;
  }
}
* {
  padding: 0;
  margin: 0;
}
.box {
  width: 100%;
  height: 63vh;
  background: #fff;
  position: relative;
  .box-top {
    height: 33%;
    border-bottom: 1px dashed #d9d9d9;
    box-sizing: border-box;
    display: flex;
    padding: 20px;
    div {
      width: 50%;
      height: 50%;
    }
    .left {
      border-right: 1px solid #333;
    }
    .right {
      padding-left: 20px;
    }
  }
  .boxBg {
    text-align: center;
    position: absolute;
    font-size: 14px;
    top: 70px;
    left: 20px;
    width: 100px;
    height: 45px;
    line-height: 45px;
    padding-top: 6px;
    box-sizing: border-box;
    background: url("../../assets/images/底框.png");
  }
  .yuan-box {
    position: absolute;
    display: flex;
    justify-content: space-between;
    width: 100%;
    top: 120px;
    .yuan {
      width: 40px;
      height: 40px;
      background: #f5f5f5;
      border-radius: 50%;
      position: absolute;
    }
    .l {
      left: -20px;
    }
    .r {
      right: -20px;
    }
  }
}
</style>